Build QNN backend on linux: add CXX platform and qnn_executorch_backend_aot host target#19889
Open
mohankumarkumar wants to merge 1 commit into
Open
Build QNN backend on linux: add CXX platform and qnn_executorch_backend_aot host target#19889mohankumarkumar wants to merge 1 commit into
mohankumarkumar wants to merge 1 commit into
Conversation
…nd_aot host target Summary: Make the QNN backend buildable on linux hosts so that AOT / offline use cases (compilation, validation, host-side testing against the simulator) can link against the QnnExecuTorchBackend without an android target. Two changes: 1. Add `CXX` to `platforms = [ANDROID]` on the QNN backend BUCK targets (5 sites across `backends/qualcomm/runtime/`, `backends/qualcomm/aot/wrappers/`, and the top-level `backends/qualcomm/targets.bzl`). The QNN runtime sources have no android-specific code (`__ANDROID__`, `fastrpc`, `dlopen` are not referenced), so expanding the platform set is a one-line tag change and the ANDROID behavior is unchanged. 2. Add `qnn_executorch_backend_aot` in `backends/qualcomm/targets.bzl`. Mirrors the structure of the existing `qnn_executorch_backend` (on-device) but depends on the host `:runtime` target instead of `:runtime_android_build`. The host runtime bundles the QNN offline-compile libraries as a Buck resource, so consumers linking the AOT variant get the libs in their dlopen search path without manual setup. Registers `"QnnBackend"` via the same link-whole static initializer as the on-device variant. Differential Revision: D105761976
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19889
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 3 PendingAs of commit f046212 with merge base 10e2eec ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
Contributor
|
@mohankumarkumar has exported this pull request. If you are a Meta employee, you can view the originating Diff in D105761976. |
Author
|
@pytorchbot label "release notes: none" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Make the QNN backend buildable on linux hosts so that AOT / offline
use cases (compilation, validation, host-side testing against the
simulator) can link against the QnnExecuTorchBackend without an
android target.
Two changes:
Add
CXXtoplatforms = [ANDROID]on the QNN backend BUCKtargets (5 sites across
backends/qualcomm/runtime/,backends/qualcomm/aot/wrappers/, and the top-levelbackends/qualcomm/targets.bzl). The QNN runtime sources have noandroid-specific code (
__ANDROID__,fastrpc,dlopenare notreferenced), so expanding the platform set is a one-line tag
change and the ANDROID behavior is unchanged.
Add
qnn_executorch_backend_aotinbackends/qualcomm/targets.bzl. Mirrors the structure of theexisting
qnn_executorch_backend(on-device) but depends on thehost
:runtimetarget instead of:runtime_android_build. Thehost runtime bundles the QNN offline-compile libraries as a Buck
resource, so consumers linking the AOT variant get the libs in
their dlopen search path without manual setup. Registers
"QnnBackend"via the same link-whole static initializer as theon-device variant.
Differential Revision: D105761976